<?php
require('config.php');
        $time=time();
        $t1=strtotime(date('Y-m-d 00:00:00',$time));
        $t2=strtotime(date('Y-m-d 08:00:00',$time));
        $t3=strtotime(date('Y-m-d 12:00:00',$time));
        $t4=strtotime(date('Y-m-d 16:00:00',$time));
        $t5=strtotime(date('Y-m-d 20:00:00',$time));
        $t6=strtotime(date('Y-m-d 24:00:00',$time));
        $data[0]['pan']=-1;
		if($time<$t2 && $time>=$t1)
		{
			$pan=1;
			$stat_time=$t1;
			$end_time=$t2;
		}
		if($time<$t3 && $time>=$t2)
		{
			$pan=2;
			$stat_time=$t2;
			$end_time=$t3;
		}
		if($time<$t4 && $time>=$t3)
		{
			$pan=3;
			$stat_time=$t3;
			$end_time=$t4;
		}
		if($time<$t5 && $time>=$t4)
		{
			$pan=4;
			$stat_time=$t4;
			$end_time=$t5;
		}
		if($time<$t6 && $time>=$t5)
		{
			$pan=5;
			$stat_time=$t5;
			$end_time=$t6;
		}
        $sql="select * from ".$oto."_goods,".$oto."_goods_seckill where ".$oto."_goods.isSeckill='1' and ".$oto."_goods.goodsId=".$oto."_goods_seckill.goodsId and ".$oto."_goods.shopId=".$oto."_goods_seckill.shopId and seckillStartTime>='{$stat_time}' and seckillEndTime<='{$end_time}' order by id DESC";
		$result=$db->query($sql);
		while($row=$result->fetch_assoc()){
			$person_info[]=$row;//将取得的所有数据赋值给person_info数组
		}
		if(isset($person_info)) echo json_encode($person_info);
		else echo '[]';
?>